import redis
class RedisClient:
    def __init__(self,  host='localhost', port=6379):
        self.client = redis.Redis(host=host, port=port)

    def get_value(self, key):
        return self.client.get(key)

    def set_value(self, key, value):
        self.client.set(key, value)

    def set_value_time(self, key, value, time):
        self.client.setex(key, time, value)

    def delete_value(self, key):
        self.client.delete(key)

r = RedisClient()

